using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class ShareCardResponse : GeneratedMessageLite<ShareCardResponse, ShareCardResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<ShareCardResponse, ShareCardResponse.Builder>
		{
			private bool resultIsReadOnly;
			private ShareCardResponse result;
			protected override ShareCardResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override ShareCardResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override ShareCardResponse DefaultInstanceForType
			{
				get
				{
					return ShareCardResponse.DefaultInstance;
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public uint RetInfoCount
			{
				get
				{
					return this.result.RetInfoCount;
				}
				set
				{
					this.SetRetInfoCount(value);
				}
			}
			public IPopsicleList<ShareCardRetInfo> RetInfoListList
			{
				get
				{
					return this.PrepareBuilder().retInfoList_;
				}
			}
			public int RetInfoListCount
			{
				get
				{
					return this.result.RetInfoListCount;
				}
			}
			public Builder()
			{
				this.result = ShareCardResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(ShareCardResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private ShareCardResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					ShareCardResponse other = this.result;
					this.result = new ShareCardResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override ShareCardResponse.Builder Clear()
			{
				this.result = ShareCardResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override ShareCardResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new ShareCardResponse.Builder(this.result);
				}
				return new ShareCardResponse.Builder().MergeFrom(this.result);
			}
			public override ShareCardResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override ShareCardResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is ShareCardResponse)
				{
					return this.MergeFrom((ShareCardResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override ShareCardResponse.Builder MergeFrom(ShareCardResponse other)
			{
				return this;
			}
			public override ShareCardResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override ShareCardResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(ShareCardResponse._shareCardResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = ShareCardResponse._shareCardResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseResponse.Builder builder = BaseResponse.CreateBuilder();
							if (this.result.hasBaseResponse)
							{
								builder.MergeFrom(this.BaseResponse);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseResponse = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasRetInfoCount = input.ReadUInt32(ref this.result.retInfoCount_);
							continue;
						}
						if (num3 == 26u)
						{
							input.ReadMessageArray<ShareCardRetInfo>(num, text, this.result.retInfoList_, ShareCardRetInfo.DefaultInstance, extensionRegistry);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public ShareCardResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public ShareCardResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public ShareCardResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public ShareCardResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public ShareCardResponse.Builder SetRetInfoCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasRetInfoCount = true;
				this.result.retInfoCount_ = value;
				return this;
			}
			public ShareCardResponse.Builder ClearRetInfoCount()
			{
				this.PrepareBuilder();
				this.result.hasRetInfoCount = false;
				this.result.retInfoCount_ = 0u;
				return this;
			}
			public ShareCardRetInfo GetRetInfoList(int index)
			{
				return this.result.GetRetInfoList(index);
			}
			public ShareCardResponse.Builder SetRetInfoList(int index, ShareCardRetInfo value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.retInfoList_[index] = value;
				return this;
			}
			public ShareCardResponse.Builder SetRetInfoList(int index, ShareCardRetInfo.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.retInfoList_[index] = builderForValue.Build();
				return this;
			}
			public ShareCardResponse.Builder AddRetInfoList(ShareCardRetInfo value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.retInfoList_.Add(value);
				return this;
			}
			public ShareCardResponse.Builder AddRetInfoList(ShareCardRetInfo.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.retInfoList_.Add(builderForValue.Build());
				return this;
			}
			public ShareCardResponse.Builder AddRangeRetInfoList(IEnumerable<ShareCardRetInfo> values)
			{
				this.PrepareBuilder();
				this.result.retInfoList_.Add(values);
				return this;
			}
			public ShareCardResponse.Builder ClearRetInfoList()
			{
				this.PrepareBuilder();
				this.result.retInfoList_.Clear();
				return this;
			}
		}
		public const int BaseResponseFieldNumber = 1;
		public const int RetInfoCountFieldNumber = 2;
		public const int RetInfoListFieldNumber = 3;
		private static readonly ShareCardResponse defaultInstance;
		private static readonly string[] _shareCardResponseFieldNames;
		private static readonly uint[] _shareCardResponseFieldTags;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasRetInfoCount;
		private uint retInfoCount_;
		private PopsicleList<ShareCardRetInfo> retInfoList_ = new PopsicleList<ShareCardRetInfo>();
		private int memoizedSerializedSize = -1;
		public static ShareCardResponse DefaultInstance
		{
			get
			{
				return ShareCardResponse.defaultInstance;
			}
		}
		public override ShareCardResponse DefaultInstanceForType
		{
			get
			{
				return ShareCardResponse.DefaultInstance;
			}
		}
		protected override ShareCardResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public uint RetInfoCount
		{
			get
			{
				return this.retInfoCount_;
			}
		}
		public IList<ShareCardRetInfo> RetInfoListList
		{
			get
			{
				return this.retInfoList_;
			}
		}
		public int RetInfoListCount
		{
			get
			{
				return this.retInfoList_.Count;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				if (!this.hasBaseResponse)
				{
					return false;
				}
				if (!this.hasRetInfoCount)
				{
					return false;
				}
				if (!this.BaseResponse.IsInitialized)
				{
					return false;
				}
				bool result;
				using (IEnumerator<ShareCardRetInfo> enumerator = this.RetInfoListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						ShareCardRetInfo current = enumerator.get_Current();
						if (!current.IsInitialized)
						{
							result = false;
							return result;
						}
					}
					return true;
				}
				return result;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseResponse);
				}
				if (this.hasRetInfoCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.RetInfoCount);
				}
				using (IEnumerator<ShareCardRetInfo> enumerator = this.RetInfoListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						ShareCardRetInfo current = enumerator.get_Current();
						num += CodedOutputStream.ComputeMessageSize(3, current);
					}
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private ShareCardResponse()
		{
		}
		public ShareCardRetInfo GetRetInfoList(int index)
		{
			return this.retInfoList_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] shareCardResponseFieldNames = ShareCardResponse._shareCardResponseFieldNames;
			if (this.hasBaseResponse)
			{
				output.WriteMessage(1, shareCardResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasRetInfoCount)
			{
				output.WriteUInt32(2, shareCardResponseFieldNames[1], this.RetInfoCount);
			}
			if (this.retInfoList_.Count > 0)
			{
				output.WriteMessageArray<ShareCardRetInfo>(3, shareCardResponseFieldNames[2], this.retInfoList_);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasRetInfoCount)
			{
				num ^= this.retInfoCount_.GetHashCode();
			}
			using (IEnumerator<ShareCardRetInfo> enumerator = this.retInfoList_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					ShareCardRetInfo current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			return num;
		}
		public override bool Equals(object value)
		{
			ShareCardResponse shareCardResponse = value as ShareCardResponse;
			if (shareCardResponse == null)
			{
				return false;
			}
			if (this.hasBaseResponse != shareCardResponse.hasBaseResponse || (this.hasBaseResponse && !this.baseResponse_.Equals(shareCardResponse.baseResponse_)))
			{
				return false;
			}
			if (this.hasRetInfoCount != shareCardResponse.hasRetInfoCount || (this.hasRetInfoCount && !this.retInfoCount_.Equals(shareCardResponse.retInfoCount_)))
			{
				return false;
			}
			if (this.retInfoList_.Count != shareCardResponse.retInfoList_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.retInfoList_.Count; i++)
			{
				if (!this.retInfoList_[i].Equals(shareCardResponse.retInfoList_[i]))
				{
					return false;
				}
			}
			return true;
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<ShareCardResponse, ShareCardResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<ShareCardResponse, ShareCardResponse.Builder>.PrintField("RetInfoCount", this.hasRetInfoCount, this.retInfoCount_, writer);
			GeneratedMessageLite<ShareCardResponse, ShareCardResponse.Builder>.PrintField<ShareCardRetInfo>("RetInfoList", this.retInfoList_, writer);
		}
		public static ShareCardResponse ParseFrom(byte[] data)
		{
			return ShareCardResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private ShareCardResponse MakeReadOnly()
		{
			this.retInfoList_.MakeReadOnly();
			return this;
		}
		public static ShareCardResponse.Builder CreateBuilder()
		{
			return new ShareCardResponse.Builder();
		}
		public override ShareCardResponse.Builder ToBuilder()
		{
			return ShareCardResponse.CreateBuilder(this);
		}
		public override ShareCardResponse.Builder CreateBuilderForType()
		{
			return new ShareCardResponse.Builder();
		}
		public static ShareCardResponse.Builder CreateBuilder(ShareCardResponse prototype)
		{
			return new ShareCardResponse.Builder(prototype);
		}
		static ShareCardResponse()
		{
			ShareCardResponse.defaultInstance = new ShareCardResponse().MakeReadOnly();
			ShareCardResponse._shareCardResponseFieldNames = new string[]
			{
				"BaseResponse",
				"RetInfoCount",
				"RetInfoList"
			};
			ShareCardResponse._shareCardResponseFieldTags = new uint[]
			{
				10u,
				16u,
				26u
			};
			object.ReferenceEquals(micromsg.Proto.ShareCardResponse.Descriptor, null);
		}
	}
}
